/**
 * 
 */
package qemese.ticket;

import qemese.ActionObject;
import qemese.ticketMachine.TicketMachine;

/**
 * @author Pawel
 *
 */
public class Ticket extends ActionObject{

	private double price;
	private String description;
	
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Ticket(double price, String description) {
		super();
		this.price = price;
		this.description = description;
	}	
	
	@Override
	public void doAction(TicketMachine actionReciever) {
		
		actionReciever.pay(this);
	}
	
	@Override
	public String toString() {
		
		return this.getDescription() + " - " + this.getPrice() + " zł";
	}
	
	
}
